/* ***********************************************************************
 * Copyright (C) 1992-- 2016 中国南方航空股份有限公司.
 *
 * Created [2016-09-08 14:37:51] by FMS Team
 * ***********************************************************************
 *
 * mybaits-generator
 * ***********************************************************************
 */
package com.foreveross.law.system.domain;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
* <p>com.foreveross.law.contract.domain.DataType</p>
*
* @author changwu.liao email:changwu.liao(a)gmail.com
* @version 1.0
* @since 1.0
* @Modified by add modified description
* @purpose add this file description here
*/
public class DataType implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias	
	public static final String TABLE_SQL_NAME = "DATA_TYPE";
	
	public static final String ALIAS_DATA_TYPE_ID = "dataTypeId";
	public static final String ALIAS_PARENT_DATA_TYPE_ID = "parentDataTypeId";
	public static final String ALIAS_TYPE_CODE = "typeCode";
	public static final String ALIAS_TYPE_NAME = "typeName";
	public static final String ALIAS_TYPE_REMARK = "typeRemark";
	
	//the column is a primary key	
	public static final String PROP_KEY = "dataTypeId";
	
	//fields START
	public static String PROP_REF="DataType";
	public static String PROP_REF_DATA_TYPE_ID = "dataTypeId";
	
	public static String PROP_REF_PARENT_DATA_TYPE_ID = "parentDataTypeId";
	
	public static String PROP_REF_TYPE_CODE = "typeCode";
	
	public static String PROP_REF_TYPE_NAME = "typeName";
	
	public static String PROP_REF_TYPE_REMARK = "typeRemark";
	
	//fields END
	
	//columns sql name START	
	public static String PROP_COLUMN_DATA_TYPE_ID = "DATA_TYPE_ID";
	public static String PROP_COLUMN_PARENT_DATA_TYPE_ID = "PARENT_DATA_TYPE_ID";
	public static String PROP_COLUMN_TYPE_CODE = "TYPE_CODE";
	public static String PROP_COLUMN_TYPE_NAME = "TYPE_NAME";
	public static String PROP_COLUMN_TYPE_REMARK = "TYPE_REMARK";
	//columns sql name END
		
	//columns START
	private java.lang.String dataTypeId;
	private java.lang.String parentDataTypeId;
	private java.lang.String typeCode;
	private java.lang.String typeName;
	private java.lang.String typeRemark;
	//columns END

	public DataType(){
	}

	public DataType(
		java.lang.String dataTypeId
	){
		this.dataTypeId = dataTypeId;
	}

	public void setDataTypeId(java.lang.String value) {
		this.dataTypeId = value;
	}
	
	public java.lang.String getDataTypeId() {
		return this.dataTypeId;
	}
	public void setParentDataTypeId(java.lang.String value) {
		this.parentDataTypeId = value;
	}
	
	public java.lang.String getParentDataTypeId() {
		return this.parentDataTypeId;
	}
	public void setTypeCode(java.lang.String value) {
		this.typeCode = value;
	}
	
	public java.lang.String getTypeCode() {
		return this.typeCode;
	}
	public void setTypeName(java.lang.String value) {
		this.typeName = value;
	}
	
	public java.lang.String getTypeName() {
		return this.typeName;
	}
	public void setTypeRemark(java.lang.String value) {
		this.typeRemark = value;
	}
	
	public java.lang.String getTypeRemark() {
		return this.typeRemark;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("DataTypeId",getDataTypeId())
			.append("ParentDataTypeId",getParentDataTypeId())
			.append("TypeCode",getTypeCode())
			.append("TypeName",getTypeName())
			.append("TypeRemark",getTypeRemark())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getDataTypeId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof DataType == false) return false;
		if(this == obj) return true;
		DataType other = (DataType)obj;
		return new EqualsBuilder()
			.append(getDataTypeId(),other.getDataTypeId())
			.isEquals();
	}
}

